package com.sscw.tcp.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum DailyTaskActionEnum {
    receive(1, "直接领取"),
    recharge(2, "今日首充"),
    total_recharge(3, "今日累计充值"),
    total_use_pinecone(4, "今日消耗松果数"),
    total_prize(5, "今日领取奖赏次数"),
    challenge(6, "今日首次发起挑战"),
    all_complete(7, "完成所有每日任务")
    ;

    private Integer code;

    private String desc;

    DailyTaskActionEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static DailyTaskActionEnum getByCode(Integer code) {
        for (DailyTaskActionEnum enums : DailyTaskActionEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
